import BasicLayout from '../layout/basicLayout.vue'
import LoginView from '../view/loginView.vue'
import HomeView from '../view/homeView.vue'
import QuestionView from '../view/topic/topicView.vue'
import MatchView from '../view/match/matchView.vue'
import UserInfoView from "../view/userInfoView.vue";
import MatchCreateView from "../view/match/matchCreateView.vue";
import TopicCreateView from "../view/topic/topicCreateView.vue";
import MatchInfoView from "../view/match/matchInfoView.vue";
import MatchTopicView from "../view/match/matchTopicView.vue";
import TopicJudgeView from "../view/topic/topicJudgeView.vue";

const routes = [
    {
        path: '/',
        component: BasicLayout,
        children: [
            {
                path: '/',
                name: '首页',
                component: HomeView
            },
            {
                path: '/question',
                name: '题库',
                component: QuestionView
            },
            {
                path: '/match',
                name: '比赛',
                component: MatchView
            },
        ]
    },
    {
        path: '/login',
        name: '登录',
        component: LoginView
    },
    {
        path: '/user/info',
        name: '用户信息',
        component: UserInfoView,
        meta: {
            hind: true,
            isAdmin: true
        }
    },
    {
        path: '/match/create',
        name: '创建考试',
        component: MatchCreateView,
        meta: {
            hind: true
        }
    },
    {
        path: '/topic/create',
        name: '创建题目',
        component: TopicCreateView,
        meta: {
            hind: true
        }
    },
    {
        path: '/match/view',
        name: '考试详情',
        component: MatchInfoView,
        meta: {
            hind: true
        }
    },
    {
        path: '/match/topic',
        name: '考试题目',
        component: MatchTopicView,
        meta: {
            hind: true
        }
    },
    {
        path: '/topic/judge',
        name: '判题',
        component: TopicJudgeView,
        meta: {
            hind: true
        }
    }
]

export default routes
